package com.oocl.shopping.dao;

import java.util.List;
import java.util.Map;

import com.oocl.shopping.dto.PayBooksDTO;

public interface OrderDao {
	
	/**
	 * 每点击一次加入购物车，则插一次数据库
	 * @param bookId
	 * @param custId
	 * @return
	 */
	public boolean addOneOrder(String bookId, String custId);
	
	/**
	 * 
	 * @param orderId
	 * @param custId
	 * @return
	 */
	public boolean delOneOrder(String orderId, String custId);
	
	/**
	 * 删除 custId 的所有订单数据
	 * @param custId
	 * @return
	 */
	public boolean delAllOrder(String custId);
	
	/**
	 * 获取 custId 的所有订单信息
	 * @param custId
	 * @return
	 */
	public List<PayBooksDTO> getOrders(String custId);
	
	/**
	 * 
	 * @param custId
	 * @param orders
	 * @return
	 */
	public boolean addOrders(String custId, Map<String, PayBooksDTO> orders);
}
